package com.chinasofti.io;

import java.io.File;
import java.io.IOException;

public class Demo05 {

    public static void main(String[] args) throws IOException {

        File f1 = new File("java0418\\java.txt");

        System.out.println(f1.isDirectory());
        System.out.println(f1.isFile());
        System.out.println(f1.exists());

        System.out.println(f1.getAbsoluteFile());
        System.out.println(f1.getPath());
        System.out.println(f1.getName());

        System.out.println("- - - - - - - - -");
        File f2 = new File("java0418\\changxin");
        File[]fileArray = f2.listFiles();
        for (File file : fileArray){
            if (file.isFile()){
                System.out.println(file.getName());
            }


        }

    }
}
